package com.pisolution.scheduler.runtime.registry;

import java.util.Date;

/**
 * 注册中心中尚存的服务节点信息.
 *
 * @author sora
 * @version 0.1.0
 */
@SuppressWarnings({"unused", "FieldCanBeLocal"})
public final class Server {
    /** 节点进程遍号. */
    private int pid;

    /** 节点所在主机. */
    private String host;

    /** 节点对外开放的端口. */
    private int port;

    /** 节点在注册中心中的注册路径. */
    private String directory;

    /** 节点所在主机的系统资源信息. */
    private String resourceInfo;

    /** 节点注册时间. */
    private Date createTime;

    /** 上一次心跳数据包上传的时间. */
    private Date lastHeartbeatTime;

    // -------------------------------------------------------------------------------------------------
    //  属性访问
    // -------------------------------------------------------------------------------------------------

    public void setPid(int pid) {
        this.pid = pid;
    }

    public String getHost() {
        return this.host;
    }

    public void setHost(String host) {
        this.host = host;
    }

    public int getPort() {
        return this.port;
    }

    public void setPort(int port) {
        this.port = port;
    }

    public void setDirectory(String directory) {
        this.directory = directory;
    }

    public void setResourceInfo(String resourceInfo) {
        this.resourceInfo = resourceInfo;
    }

    public Date getCreateTime() {
        return this.createTime;
    }

    public void setCreateTime(Date createTime) {
        this.createTime = createTime;
    }

    public void setLastHeartbeatTime(Date lastHeartbeatTime) {
        this.lastHeartbeatTime = lastHeartbeatTime;
    }
}
